﻿Ext.define('Happy.cms.category.metadata.Metadata', {
    extend: 'Happy.metadata.Metadata',
    singleton: true,

    constructor: function () {
        var me = this;

        me.data = {
            namespace: 'Happy.cms',
            name: 'Category',
            plural: 'Categories',
            urlPrefix: 'Happy/Cms',
            displayName: '分类',
            summaryProperty: 'Name',
            isTree: true,
            properties: {
                Id: {
                    name: 'Id',
                    dataType: "Guid"
                },
                OptimisticKey: {
                    name: 'OptimisticKey',
                    dataType: "String"
                },
                Name: {
                    name: 'Name',
                    dataType: "String",
                    displayName: '名称'
                },
                SeoInfo_Title: {
                    name: 'SeoInfo_Title',
                    dataType: "String",
                    displayName: 'SEO 标题'
                },
                SeoInfo_KeyWord: {
                    name: 'SeoInfo_KeyWord',
                    dataType: "String",
                    displayName: 'SEO 关键字'
                },
                SeoInfo_Description: {
                    name: 'SeoInfo_Description',
                    dataType: "String",
                    displayName: 'SEO 描述'
                },
                NodePath: {
                    name: 'NodePath',
                    dataType: "String"
                },
                ParentId: {
                    name: 'ParentId',
                    dataType: "Guid"
                },
                Order: {
                    name: 'Order',
                    dataType: "Int"
                }
            }
        };

        me.rules = ['tree-node', 'orderable'];

        me.callParent(arguments);
    }
});